import jsonschema

data = {"success": True, "code": 10000, "message": "操作成功", "data": None}
schema = {"type": "object",
          "properties": {
              "success": {"const": True},
              "code": {"const": 10000},
              "message": {"const": "操作成功"},
              "data": {"const": None},

          }
          }
res=jsonschema.validate(instance=data,schema=schema)
print(res)